.class public Lcom/nemustech/tiffany/world/TFReflectivePanel;
.super Lcom/nemustech/tiffany/world/TFCustomPanel;
.source "TFReflectivePanel.java"


# static fields
.field protected static final TAG:Ljava/lang/String; = "TFReflectivePanel"


# instance fields
.field protected mColorBuffer:Ljava/nio/FloatBuffer;

.field protected mMeshColor:[F

.field protected final mReflectionPoints:[F

.field protected final mReflectionRates:[F

.field protected final mStepCount:I


# direct methods
.method public constructor <init>(FF)V
    .locals 1
    .parameter "width"
    .parameter "height"

    .prologue
    .line 39
    const/4 v0, 0x3

    invoke-direct {p0, p1, p2, v0}, Lcom/nemustech/tiffany/world/TFReflectivePanel;-><init>(FFI)V

    .line 40
    return-void
.end method

.method public constructor <init>(FFI)V
    .locals 9
    .parameter "width"
    .parameter "height"
    .parameter "steps"

    .prologue
    const/4 v8, 0x0

    const/high16 v7, 0x3f80

    const/4 v6, 0x1

    .line 50
    invoke-direct {p0, p1, p2, v6, p3}, Lcom/nemustech/tiffany/world/TFCustomPanel;-><init>(FFII)V

    .line 51
    iput p3, p0, Lcom/nemustech/tiffany/world/TFReflectivePanel;->mStepCount:I

    .line 52
    iget v3, p0, Lcom/nemustech/tiffany/world/TFReflectivePanel;->mStepCount:I

    add-int/lit8 v3, v3, 0x1

    new-array v3, v3, [F

    iput-object v3, p0, Lcom/nemustech/tiffany/world/TFReflectivePanel;->mReflectionRates:[F

    .line 53
    iget v3, p0, Lcom/nemustech/tiffany/world/TFReflectivePanel;->mStepCount:I

    add-int/lit8 v3, v3, 0x1

    new-array v3, v3, [F

    iput-object v3, p0, Lcom/nemustech/tiffany/world/TFReflectivePanel;->mReflectionPoints:[F

    .line 54
    const/4 v1, 0x0

    .local v1, i:I
    :goto_0
    iget-object v3, p0, Lcom/nemustech/tiffany/world/TFReflectivePanel;->mReflectionRates:[F

    array-length v3, v3

    if-ge v1, v3, :cond_1

    .line 55
    iget v3, p0, Lcom/nemustech/tiffany/world/TFReflectivePanel;->mStepCount:I

    if-ge v1, v3, :cond_0

    .line 56
    iget-object v3, p0, Lcom/nemustech/tiffany/world/TFReflectivePanel;->mReflectionRates:[F

    iget v4, p0, Lcom/nemustech/tiffany/world/TFReflectivePanel;->mStepCount:I

    sub-int/2addr v4, v6

    int-to-float v4, v4

    div-float v4, v7, v4

    int-to-float v5, v1

    mul-float/2addr v4, v5

    sub-float v4, v7, v4

    aput v4, v3, v1

    .line 57
    iget-object v3, p0, Lcom/nemustech/tiffany/world/TFReflectivePanel;->mReflectionPoints:[F

    iget v4, p0, Lcom/nemustech/tiffany/world/TFReflectivePanel;->mStepCount:I

    sub-int/2addr v4, v6

    int-to-float v4, v4

    div-float v4, v7, v4

    int-to-float v5, v1

    mul-float/2addr v4, v5

    aput v4, v3, v1

    .line 63
    :goto_1
    const-string v3, "TFReflectivePanel"

    new-instance v4, Ljava/lang/StringBuilder;

    invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V

    const-string v5, "Reflection rate at step "

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {v4, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v4

    const-string v5, ": "

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    iget-object v5, p0, Lcom/nemustech/tiffany/world/TFReflectivePanel;->mReflectionRates:[F

    aget v5, v5, v1

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(F)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v4

    invoke-static {v3, v4}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 54
    add-int/lit8 v1, v1, 0x1

    goto :goto_0

    .line 60
    :cond_0
    iget-object v3, p0, Lcom/nemustech/tiffany/world/TFReflectivePanel;->mReflectionRates:[F

    const/4 v4, 0x0

    aput v4, v3, v1

    .line 61
    iget-object v3, p0, Lcom/nemustech/tiffany/world/TFReflectivePanel;->mReflectionPoints:[F

    aput v7, v3, v1

    goto :goto_1

    .line 66
    :cond_1
    iput v8, p0, Lcom/nemustech/tiffany/world/TFReflectivePanel;->mRequestUpdateTexCoordCount:I

    .line 67
    invoke-virtual {p0, v6}, Lcom/nemustech/tiffany/world/TFReflectivePanel;->setBeautyReflection(Z)V

    .line 69
    iget v3, p0, Lcom/nemustech/tiffany/world/TFReflectivePanel;->mMeshHeight:I

    add-int/lit8 v3, v3, 0x1

    iget v4, p0, Lcom/nemustech/tiffany/world/TFReflectivePanel;->mMeshWidth:I

    add-int/lit8 v4, v4, 0x1

    mul-int v2, v3, v4

    .line 70
    .local v2, vertexCount:I
    mul-int/lit8 v3, v2, 0x4

    new-array v3, v3, [F

    iput-object v3, p0, Lcom/nemustech/tiffany/world/TFReflectivePanel;->mMeshColor:[F

    .line 71
    iget-object v3, p0, Lcom/nemustech/tiffany/world/TFReflectivePanel;->mMeshColor:[F

    invoke-virtual {p0, v3}, Lcom/nemustech/tiffany/world/TFReflectivePanel;->loadIdentityColor([F)V

    .line 73
    iget v3, p0, Lcom/nemustech/tiffany/world/TFReflectivePanel;->mFaceOffset:I

    mul-int/lit8 v0, v3, 0x2

    .line 74
    .local v0, arraySize:I
    mul-int/lit8 v3, v0, 0x4

    invoke-static {v3}, Lcom/nemustech/tiffany/world/TFReflectivePanel;->newFloatBuffer(I)Ljava/nio/FloatBuffer;

    move-result-object v3

    iput-object v3, p0, Lcom/nemustech/tiffany/world/TFReflectivePanel;->mColorBuffer:Ljava/nio/FloatBuffer;

    .line 75
    invoke-virtual {p0, v8}, Lcom/nemustech/tiffany/world/TFReflectivePanel;->buildColorArray(I)V

    .line 76
    invoke-virtual {p0, v6}, Lcom/nemustech/tiffany/world/TFReflectivePanel;->buildColorArray(I)V

    .line 77
    return-void
.end method


# virtual methods
.method protected buildAllArray()V
    .locals 10

    .prologue
    const/4 v9, 0x1

    const/4 v8, 0x0

    .line 100
    const/4 v2, 0x0

    .local v2, vertexPairIndex:I
    :goto_0
    iget v3, p0, Lcom/nemustech/tiffany/world/TFReflectivePanel;->mStepCount:I

    add-int/lit8 v3, v3, 0x1

    if-ge v2, v3, :cond_0

    .line 101
    mul-int/lit8 v0, v2, 0x2

    .line 102
    .local v0, vertexIndex1:I
    add-int/lit8 v1, v0, 0x1

    .line 103
    .local v1, vertexIndex2:I
    iget-object v3, p0, Lcom/nemustech/tiffany/world/TFReflectivePanel;->mMeshVertex:[F

    mul-int/lit8 v4, v0, 0x3

    add-int/lit8 v4, v4, 0x1

    iget-object v5, p0, Lcom/nemustech/tiffany/world/TFReflectivePanel;->mMeshVertex:[F

    mul-int/lit8 v6, v1, 0x3

    add-int/lit8 v6, v6, 0x1

    iget-object v7, p0, Lcom/nemustech/tiffany/world/TFReflectivePanel;->mReflectionPoints:[F

    aget v7, v7, v2

    aput v7, v5, v6

    aput v7, v3, v4

    .line 104
    iget-object v3, p0, Lcom/nemustech/tiffany/world/TFReflectivePanel;->mMeshTexCoord:[F

    mul-int/lit8 v4, v0, 0x2

    add-int/lit8 v4, v4, 0x1

    iget-object v5, p0, Lcom/nemustech/tiffany/world/TFReflectivePanel;->mMeshTexCoord:[F

    mul-int/lit8 v6, v1, 0x2

    add-int/lit8 v6, v6, 0x1

    iget-object v7, p0, Lcom/nemustech/tiffany/world/TFReflectivePanel;->mReflectionPoints:[F

    aget v7, v7, v2

    aput v7, v5, v6

    aput v7, v3, v4

    .line 100
    add-int/lit8 v2, v2, 0x1

    goto :goto_0

    .line 108
    .end local v0           #vertexIndex1:I
    .end local v1           #vertexIndex2:I
    :cond_0
    invoke-virtual {p0, v8}, Lcom/nemustech/tiffany/world/TFReflectivePanel;->buildVertexArray(I)V

    .line 109
    invoke-virtual {p0, v9}, Lcom/nemustech/tiffany/world/TFReflectivePanel;->buildVertexArray(I)V

    .line 110
    invoke-virtual {p0, v8}, Lcom/nemustech/tiffany/world/TFReflectivePanel;->buildColorArray(I)V

    .line 111
    invoke-virtual {p0, v9}, Lcom/nemustech/tiffany/world/TFReflectivePanel;->buildColorArray(I)V

    .line 112
    invoke-virtual {p0, v8}, Lcom/nemustech/tiffany/world/TFReflectivePanel;->buildTexCoordArray(I)V

    .line 113
    invoke-virtual {p0, v9}, Lcom/nemustech/tiffany/world/TFReflectivePanel;->buildTexCoordArray(I)V

    .line 114
    return-void
.end method

.method protected buildColorArray(I)V
    .locals 13
    .parameter "face"

    .prologue
    const/4 v12, 0x0

    .line 188
    iget v5, p0, Lcom/nemustech/tiffany/world/TFReflectivePanel;->mMeshWidth:I

    .line 189
    .local v5, meshW:I
    iget v4, p0, Lcom/nemustech/tiffany/world/TFReflectivePanel;->mMeshHeight:I

    .line 190
    .local v4, meshH:I
    iget v9, p0, Lcom/nemustech/tiffany/world/TFReflectivePanel;->mMeshWidth:I

    add-int/lit8 v8, v9, 0x1

    .line 191
    .local v8, vertexW:I
    iget v9, p0, Lcom/nemustech/tiffany/world/TFReflectivePanel;->mFaceOffset:I

    mul-int/lit8 v6, v9, 0x4

    .line 192
    .local v6, offset:I
    iget-object v7, p0, Lcom/nemustech/tiffany/world/TFReflectivePanel;->mTempFloat8:[F

    .line 194
    .local v7, rgba:[F
    iget-object v9, p0, Lcom/nemustech/tiffany/world/TFReflectivePanel;->mColorBuffer:Ljava/nio/FloatBuffer;

    mul-int v10, p1, v6

    invoke-virtual {v9, v10}, Ljava/nio/FloatBuffer;->position(I)Ljava/nio/Buffer;

    .line 195
    const/4 v3, 0x0

    .local v3, j:I
    :goto_0
    if-ge v3, v4, :cond_1

    .line 196
    add-int/lit8 v9, v3, 0x1

    mul-int/2addr v9, v8

    mul-int/lit8 v1, v9, 0x4

    .line 197
    .local v1, index1:I
    mul-int v9, v3, v8

    mul-int/lit8 v2, v9, 0x4

    .line 198
    .local v2, index2:I
    const/4 v0, 0x0

    .local v0, i:I
    :goto_1
    if-gt v0, v5, :cond_0

    .line 199
    iget-object v9, p0, Lcom/nemustech/tiffany/world/TFReflectivePanel;->mMeshColor:[F

    add-int/lit8 v10, v1, 0x0

    aget v9, v9, v10

    aput v9, v7, v12

    .line 200
    const/4 v9, 0x1

    iget-object v10, p0, Lcom/nemustech/tiffany/world/TFReflectivePanel;->mMeshColor:[F

    add-int/lit8 v11, v1, 0x1

    aget v10, v10, v11

    aput v10, v7, v9

    .line 201
    const/4 v9, 0x2

    iget-object v10, p0, Lcom/nemustech/tiffany/world/TFReflectivePanel;->mMeshColor:[F

    add-int/lit8 v11, v1, 0x2

    aget v10, v10, v11

    aput v10, v7, v9

    .line 202
    const/4 v9, 0x3

    iget-object v10, p0, Lcom/nemustech/tiffany/world/TFReflectivePanel;->mMeshColor:[F

    add-int/lit8 v11, v1, 0x3

    aget v10, v10, v11

    aput v10, v7, v9

    .line 203
    const/4 v9, 0x4

    iget-object v10, p0, Lcom/nemustech/tiffany/world/TFReflectivePanel;->mMeshColor:[F

    add-int/lit8 v11, v2, 0x0

    aget v10, v10, v11

    aput v10, v7, v9

    .line 204
    const/4 v9, 0x5

    iget-object v10, p0, Lcom/nemustech/tiffany/world/TFReflectivePanel;->mMeshColor:[F

    add-int/lit8 v11, v2, 0x1

    aget v10, v10, v11

    aput v10, v7, v9

    .line 205
    const/4 v9, 0x6

    iget-object v10, p0, Lcom/nemustech/tiffany/world/TFReflectivePanel;->mMeshColor:[F

    add-int/lit8 v11, v2, 0x2

    aget v10, v10, v11

    aput v10, v7, v9

    .line 206
    const/4 v9, 0x7

    iget-object v10, p0, Lcom/nemustech/tiffany/world/TFReflectivePanel;->mMeshColor:[F

    add-int/lit8 v11, v2, 0x3

    aget v10, v10, v11

    aput v10, v7, v9

    .line 207
    iget-object v9, p0, Lcom/nemustech/tiffany/world/TFReflectivePanel;->mColorBuffer:Ljava/nio/FloatBuffer;

    invoke-virtual {v9, v7}, Ljava/nio/FloatBuffer;->put([F)Ljava/nio/FloatBuffer;

    .line 208
    add-int/lit8 v1, v1, 0x4

    .line 209
    add-int/lit8 v2, v2, 0x4

    .line 198
    add-int/lit8 v0, v0, 0x1

    goto :goto_1

    .line 195
    :cond_0
    add-int/lit8 v3, v3, 0x1

    goto :goto_0

    .line 212
    .end local v0           #i:I
    .end local v1           #index1:I
    .end local v2           #index2:I
    :cond_1
    iget-object v9, p0, Lcom/nemustech/tiffany/world/TFReflectivePanel;->mColorBuffer:Ljava/nio/FloatBuffer;

    invoke-virtual {v9, v12}, Ljava/nio/FloatBuffer;->position(I)Ljava/nio/Buffer;

    .line 213
    return-void
.end method

.method protected loadIdentityColor([F)V
    .locals 8
    .parameter "color"

    .prologue
    const/4 v7, 0x0

    .line 171
    iget v4, p0, Lcom/nemustech/tiffany/world/TFReflectivePanel;->mMeshWidth:I

    .line 172
    .local v4, meshW:I
    iget v2, p0, Lcom/nemustech/tiffany/world/TFReflectivePanel;->mMeshHeight:I

    .line 174
    .local v2, meshH:I
    const/4 v1, 0x0

    .local v1, j:I
    :goto_0
    if-gt v1, v2, :cond_1

    .line 175
    add-int/lit8 v5, v4, 0x1

    mul-int/2addr v5, v1

    mul-int/lit8 v3, v5, 0x4

    .line 177
    .local v3, meshIndex:I
    const/4 v0, 0x0

    .local v0, i:I
    :goto_1
    if-gt v0, v4, :cond_0

    .line 178
    add-int/lit8 v5, v3, 0x0

    aput v7, p1, v5

    .line 179
    add-int/lit8 v5, v3, 0x1

    aput v7, p1, v5

    .line 180
    add-int/lit8 v5, v3, 0x2

    aput v7, p1, v5

    .line 181
    add-int/lit8 v5, v3, 0x3

    const/high16 v6, 0x3f80

    aput v6, p1, v5

    .line 182
    add-int/lit8 v3, v3, 0x4

    .line 177
    add-int/lit8 v0, v0, 0x1

    goto :goto_1

    .line 174
    :cond_0
    add-int/lit8 v1, v1, 0x1

    goto :goto_0

    .line 185
    .end local v0           #i:I
    .end local v3           #meshIndex:I
    :cond_1
    return-void
.end method

.method public logTexArray()V
    .locals 4

    .prologue
    .line 304
    iget-object v2, p0, Lcom/nemustech/tiffany/world/TFReflectivePanel;->mMeshTexCoord:[F

    if-eqz v2, :cond_3

    .line 305
    const-string v1, "-------------------- TexArray -------------------------\n"

    .line 306
    .local v1, log:Ljava/lang/String;
    const/4 v0, 0x0

    .local v0, i:I
    :goto_0
    iget-object v2, p0, Lcom/nemustech/tiffany/world/TFReflectivePanel;->mMeshTexCoord:[F

    array-length v2, v2

    if-ge v0, v2, :cond_2

    .line 307
    rem-int/lit8 v2, v0, 0x2

    if-nez v2, :cond_1

    .line 308
    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v2, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    const-string v3, "("

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    iget-object v3, p0, Lcom/nemustech/tiffany/world/TFReflectivePanel;->mMeshTexCoord:[F

    aget v3, v3, v0

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(F)Ljava/lang/StringBuilder;

    move-result-object v2

    const-string v3, ","

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    .line 313
    :goto_1
    rem-int/lit8 v2, v0, 0x4

    const/4 v3, 0x3

    if-ne v2, v3, :cond_0

    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v2, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    const-string v3, "\n"

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    .line 306
    :cond_0
    add-int/lit8 v0, v0, 0x1

    goto :goto_0

    .line 311
    :cond_1
    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v2, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    const-string v3, " "

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    iget-object v3, p0, Lcom/nemustech/tiffany/world/TFReflectivePanel;->mMeshTexCoord:[F

    aget v3, v3, v0

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(F)Ljava/lang/StringBuilder;

    move-result-object v2

    const-string v3, ")"

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    goto :goto_1

    .line 315
    :cond_2
    const-string v2, "TFReflectivePanel"

    invoke-static {v2, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 317
    .end local v0           #i:I
    .end local v1           #log:Ljava/lang/String;
    :cond_3
    return-void
.end method

.method public logVertexArray()V
    .locals 4

    .prologue
    .line 263
    iget-object v2, p0, Lcom/nemustech/tiffany/world/TFReflectivePanel;->mMeshVertex:[F

    if-eqz v2, :cond_4

    .line 264
    const-string v1, "-------------------- VertexArray -------------------------\n"

    .line 265
    .local v1, log:Ljava/lang/String;
    const/4 v0, 0x0

    .local v0, i:I
    :goto_0
    iget-object v2, p0, Lcom/nemustech/tiffany/world/TFReflectivePanel;->mMeshVertex:[F

    array-length v2, v2

    if-ge v0, v2, :cond_3

    .line 266
    rem-int/lit8 v2, v0, 0x3

    if-nez v2, :cond_1

    .line 267
    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v2, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    const-string v3, "("

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    iget-object v3, p0, Lcom/nemustech/tiffany/world/TFReflectivePanel;->mMeshVertex:[F

    aget v3, v3, v0

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(F)Ljava/lang/StringBuilder;

    move-result-object v2

    const-string v3, ","

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    .line 275
    :goto_1
    rem-int/lit8 v2, v0, 0x6

    const/4 v3, 0x5

    if-ne v2, v3, :cond_0

    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v2, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    const-string v3, "\n"

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    .line 265
    :cond_0
    add-int/lit8 v0, v0, 0x1

    goto :goto_0

    .line 269
    :cond_1
    rem-int/lit8 v2, v0, 0x3

    const/4 v3, 0x1

    if-ne v2, v3, :cond_2

    .line 270
    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v2, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    const-string v3, " "

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    iget-object v3, p0, Lcom/nemustech/tiffany/world/TFReflectivePanel;->mMeshVertex:[F

    aget v3, v3, v0

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(F)Ljava/lang/StringBuilder;

    move-result-object v2

    const-string v3, ","

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    goto :goto_1

    .line 273
    :cond_2
    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v2, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    const-string v3, " "

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    iget-object v3, p0, Lcom/nemustech/tiffany/world/TFReflectivePanel;->mMeshVertex:[F

    aget v3, v3, v0

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(F)Ljava/lang/StringBuilder;

    move-result-object v2

    const-string v3, ")"

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    goto :goto_1

    .line 277
    :cond_3
    const-string v2, "TFReflectivePanel"

    invoke-static {v2, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 279
    .end local v0           #i:I
    .end local v1           #log:Ljava/lang/String;
    :cond_4
    return-void
.end method

.method protected onSetOpacity(Ljavax/microedition/khronos/opengles/GL10;FZ)V
    .locals 9
    .parameter "gl"
    .parameter "opacity"
    .parameter "reflection"

    .prologue
    const/4 v8, 0x1

    .line 223
    if-eqz p3, :cond_3

    iget-boolean v5, p0, Lcom/nemustech/tiffany/world/TFReflectivePanel;->mBeautyReflection:Z

    if-eqz v5, :cond_3

    .line 224
    iget-object v5, p0, Lcom/nemustech/tiffany/world/TFReflectivePanel;->mWorld:Lcom/nemustech/tiffany/world/TFWorld;

    iget v5, v5, Lcom/nemustech/tiffany/world/TFWorld;->mReflectionOpacity:F

    mul-float v0, p2, v5

    .line 225
    .local v0, reflectionOpacity:F
    const v5, 0x8076

    invoke-interface {p1, v5}, Ljavax/microedition/khronos/opengles/GL10;->glEnableClientState(I)V

    .line 226
    const/4 v4, 0x0

    .local v4, vertexPairIndex:I
    :goto_0
    iget v5, p0, Lcom/nemustech/tiffany/world/TFReflectivePanel;->mStepCount:I

    add-int/lit8 v5, v5, 0x1

    if-ge v4, v5, :cond_2

    .line 228
    iget-object v5, p0, Lcom/nemustech/tiffany/world/TFReflectivePanel;->mReflectionRates:[F

    aget v5, v5, v4

    mul-float v1, v0, v5

    .line 229
    .local v1, reflectionOpacityValue:F
    const-string v5, "TFReflectivePanel"

    new-instance v6, Ljava/lang/StringBuilder;

    invoke-direct {v6}, Ljava/lang/StringBuilder;-><init>()V

    const-string v7, "ReflectionOpaicty value of vertex Pair "

    invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v6

    invoke-virtual {v6, v4}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v6

    const-string v7, ": "

    invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v6

    invoke-virtual {v6, v1}, Ljava/lang/StringBuilder;->append(F)Ljava/lang/StringBuilder;

    move-result-object v6

    invoke-virtual {v6}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v6

    invoke-static {v5, v6}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 232
    iget v5, p0, Lcom/nemustech/tiffany/world/TFReflectivePanel;->mStepCount:I

    sub-int/2addr v5, v8

    if-ge v4, v5, :cond_0

    .line 233
    mul-int/lit8 v5, v4, 0x4

    add-int/lit8 v2, v5, 0x1

    .line 234
    .local v2, vertexIndex1:I
    mul-int/lit8 v5, v4, 0x4

    add-int/lit8 v3, v5, 0x3

    .line 235
    .local v3, vertexIndex2:I
    iget-object v5, p0, Lcom/nemustech/tiffany/world/TFReflectivePanel;->mColorBuffer:Ljava/nio/FloatBuffer;

    mul-int/lit8 v6, v2, 0x4

    add-int/lit8 v6, v6, 0x0

    invoke-virtual {v5, v6, v1}, Ljava/nio/FloatBuffer;->put(IF)Ljava/nio/FloatBuffer;

    .line 236
    iget-object v5, p0, Lcom/nemustech/tiffany/world/TFReflectivePanel;->mColorBuffer:Ljava/nio/FloatBuffer;

    mul-int/lit8 v6, v2, 0x4

    add-int/lit8 v6, v6, 0x1

    invoke-virtual {v5, v6, v1}, Ljava/nio/FloatBuffer;->put(IF)Ljava/nio/FloatBuffer;

    .line 237
    iget-object v5, p0, Lcom/nemustech/tiffany/world/TFReflectivePanel;->mColorBuffer:Ljava/nio/FloatBuffer;

    mul-int/lit8 v6, v2, 0x4

    add-int/lit8 v6, v6, 0x2

    invoke-virtual {v5, v6, v1}, Ljava/nio/FloatBuffer;->put(IF)Ljava/nio/FloatBuffer;

    .line 238
    iget-object v5, p0, Lcom/nemustech/tiffany/world/TFReflectivePanel;->mColorBuffer:Ljava/nio/FloatBuffer;

    mul-int/lit8 v6, v2, 0x4

    add-int/lit8 v6, v6, 0x3

    invoke-virtual {v5, v6, v1}, Ljava/nio/FloatBuffer;->put(IF)Ljava/nio/FloatBuffer;

    .line 239
    iget-object v5, p0, Lcom/nemustech/tiffany/world/TFReflectivePanel;->mColorBuffer:Ljava/nio/FloatBuffer;

    mul-int/lit8 v6, v3, 0x4

    add-int/lit8 v6, v6, 0x0

    invoke-virtual {v5, v6, v1}, Ljava/nio/FloatBuffer;->put(IF)Ljava/nio/FloatBuffer;

    .line 240
    iget-object v5, p0, Lcom/nemustech/tiffany/world/TFReflectivePanel;->mColorBuffer:Ljava/nio/FloatBuffer;

    mul-int/lit8 v6, v3, 0x4

    add-int/lit8 v6, v6, 0x1

    invoke-virtual {v5, v6, v1}, Ljava/nio/FloatBuffer;->put(IF)Ljava/nio/FloatBuffer;

    .line 241
    iget-object v5, p0, Lcom/nemustech/tiffany/world/TFReflectivePanel;->mColorBuffer:Ljava/nio/FloatBuffer;

    mul-int/lit8 v6, v3, 0x4

    add-int/lit8 v6, v6, 0x2

    invoke-virtual {v5, v6, v1}, Ljava/nio/FloatBuffer;->put(IF)Ljava/nio/FloatBuffer;

    .line 242
    iget-object v5, p0, Lcom/nemustech/tiffany/world/TFReflectivePanel;->mColorBuffer:Ljava/nio/FloatBuffer;

    mul-int/lit8 v6, v3, 0x4

    add-int/lit8 v6, v6, 0x3

    invoke-virtual {v5, v6, v1}, Ljava/nio/FloatBuffer;->put(IF)Ljava/nio/FloatBuffer;

    .line 244
    .end local v2           #vertexIndex1:I
    .end local v3           #vertexIndex2:I
    :cond_0
    if-lez v4, :cond_1

    .line 245
    sub-int v5, v4, v8

    mul-int/lit8 v2, v5, 0x4

    .line 246
    .restart local v2       #vertexIndex1:I
    sub-int v5, v4, v8

    mul-int/lit8 v5, v5, 0x4

    add-int/lit8 v3, v5, 0x2

    .line 247
    .restart local v3       #vertexIndex2:I
    iget-object v5, p0, Lcom/nemustech/tiffany/world/TFReflectivePanel;->mColorBuffer:Ljava/nio/FloatBuffer;

    mul-int/lit8 v6, v2, 0x4

    add-int/lit8 v6, v6, 0x0

    invoke-virtual {v5, v6, v1}, Ljava/nio/FloatBuffer;->put(IF)Ljava/nio/FloatBuffer;

    .line 248
    iget-object v5, p0, Lcom/nemustech/tiffany/world/TFReflectivePanel;->mColorBuffer:Ljava/nio/FloatBuffer;

    mul-int/lit8 v6, v2, 0x4

    add-int/lit8 v6, v6, 0x1

    invoke-virtual {v5, v6, v1}, Ljava/nio/FloatBuffer;->put(IF)Ljava/nio/FloatBuffer;

    .line 249
    iget-object v5, p0, Lcom/nemustech/tiffany/world/TFReflectivePanel;->mColorBuffer:Ljava/nio/FloatBuffer;

    mul-int/lit8 v6, v2, 0x4

    add-int/lit8 v6, v6, 0x2

    invoke-virtual {v5, v6, v1}, Ljava/nio/FloatBuffer;->put(IF)Ljava/nio/FloatBuffer;

    .line 250
    iget-object v5, p0, Lcom/nemustech/tiffany/world/TFReflectivePanel;->mColorBuffer:Ljava/nio/FloatBuffer;

    mul-int/lit8 v6, v2, 0x4

    add-int/lit8 v6, v6, 0x3

    invoke-virtual {v5, v6, v1}, Ljava/nio/FloatBuffer;->put(IF)Ljava/nio/FloatBuffer;

    .line 251
    iget-object v5, p0, Lcom/nemustech/tiffany/world/TFReflectivePanel;->mColorBuffer:Ljava/nio/FloatBuffer;

    mul-int/lit8 v6, v3, 0x4

    add-int/lit8 v6, v6, 0x0

    invoke-virtual {v5, v6, v1}, Ljava/nio/FloatBuffer;->put(IF)Ljava/nio/FloatBuffer;

    .line 252
    iget-object v5, p0, Lcom/nemustech/tiffany/world/TFReflectivePanel;->mColorBuffer:Ljava/nio/FloatBuffer;

    mul-int/lit8 v6, v3, 0x4

    add-int/lit8 v6, v6, 0x1

    invoke-virtual {v5, v6, v1}, Ljava/nio/FloatBuffer;->put(IF)Ljava/nio/FloatBuffer;

    .line 253
    iget-object v5, p0, Lcom/nemustech/tiffany/world/TFReflectivePanel;->mColorBuffer:Ljava/nio/FloatBuffer;

    mul-int/lit8 v6, v3, 0x4

    add-int/lit8 v6, v6, 0x2

    invoke-virtual {v5, v6, v1}, Ljava/nio/FloatBuffer;->put(IF)Ljava/nio/FloatBuffer;

    .line 254
    iget-object v5, p0, Lcom/nemustech/tiffany/world/TFReflectivePanel;->mColorBuffer:Ljava/nio/FloatBuffer;

    mul-int/lit8 v6, v3, 0x4

    add-int/lit8 v6, v6, 0x3

    invoke-virtual {v5, v6, v1}, Ljava/nio/FloatBuffer;->put(IF)Ljava/nio/FloatBuffer;

    .line 226
    .end local v2           #vertexIndex1:I
    .end local v3           #vertexIndex2:I
    :cond_1
    add-int/lit8 v4, v4, 0x1

    goto/16 :goto_0

    .line 257
    .end local v1           #reflectionOpacityValue:F
    :cond_2
    const/4 v5, 0x4

    const/16 v6, 0x1406

    const/4 v7, 0x0

    iget-object v8, p0, Lcom/nemustech/tiffany/world/TFReflectivePanel;->mColorBuffer:Ljava/nio/FloatBuffer;

    invoke-interface {p1, v5, v6, v7, v8}, Ljavax/microedition/khronos/opengles/GL10;->glColorPointer(IIILjava/nio/Buffer;)V

    .line 260
    .end local v0           #reflectionOpacity:F
    .end local v4           #vertexPairIndex:I
    :goto_1
    return-void

    .line 259
    :cond_3
    invoke-super {p0, p1, p2, p3}, Lcom/nemustech/tiffany/world/TFCustomPanel;->onSetOpacity(Ljavax/microedition/khronos/opengles/GL10;FZ)V

    goto :goto_1
.end method

.method public setInflectionPointPosition(IF)V
    .locals 3
    .parameter "inflectionPointIdx"
    .parameter "position"

    .prologue
    .line 127
    add-int/lit8 p1, p1, 0x1

    .line 128
    if-gtz p1, :cond_0

    iget v1, p0, Lcom/nemustech/tiffany/world/TFReflectivePanel;->mStepCount:I

    const/4 v2, 0x2

    sub-int/2addr v1, v2

    if-ge p1, v1, :cond_5

    .line 129
    :cond_0
    move v0, p1

    .line 130
    .local v0, idx:I
    :goto_0
    iget-object v1, p0, Lcom/nemustech/tiffany/world/TFReflectivePanel;->mReflectionPoints:[F

    add-int/lit8 v0, v0, -0x1

    aget v1, v1, v0

    cmpl-float v1, v1, p2

    if-lez v1, :cond_1

    .line 131
    iget-object v1, p0, Lcom/nemustech/tiffany/world/TFReflectivePanel;->mReflectionPoints:[F

    aput p2, v1, v0

    goto :goto_0

    .line 133
    :cond_1
    move v0, p1

    .line 134
    :goto_1
    iget-object v1, p0, Lcom/nemustech/tiffany/world/TFReflectivePanel;->mReflectionPoints:[F

    add-int/lit8 v0, v0, 0x1

    aget v1, v1, v0

    cmpg-float v1, v1, p2

    if-gez v1, :cond_2

    .line 135
    iget-object v1, p0, Lcom/nemustech/tiffany/world/TFReflectivePanel;->mReflectionPoints:[F

    aput p2, v1, v0

    goto :goto_1

    .line 138
    :cond_2
    iget-object v1, p0, Lcom/nemustech/tiffany/world/TFReflectivePanel;->mReflectionPoints:[F

    const/4 v2, 0x1

    sub-int v2, p1, v2

    aget v1, v1, v2

    cmpg-float v1, p2, v1

    if-ltz v1, :cond_3

    iget-object v1, p0, Lcom/nemustech/tiffany/world/TFReflectivePanel;->mReflectionPoints:[F

    add-int/lit8 v2, p1, 0x1

    aget v1, v1, v2

    cmpg-float v1, v1, p2

    if-gez v1, :cond_4

    .line 139
    :cond_3
    const-string v1, "TFReflectivePanel"

    const-string v2, "setInflectionPoint() ERROR. Argument position is invalid."

    invoke-static {v1, v2}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I

    .line 150
    .end local v0           #idx:I
    :goto_2
    return-void

    .line 143
    .restart local v0       #idx:I
    :cond_4
    iget-object v1, p0, Lcom/nemustech/tiffany/world/TFReflectivePanel;->mReflectionPoints:[F

    aput p2, v1, p1

    goto :goto_2

    .line 147
    .end local v0           #idx:I
    :cond_5
    const-string v1, "TFReflectivePanel"

    const-string v2, "setInflectionPoint() ERROR. Argument inflectionPoint must be a positive integer less than the (number of steps -1)."

    invoke-static {v1, v2}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I

    goto :goto_2
.end method

.method public setInflectionPointRelfectionRate(IF)V
    .locals 2
    .parameter "inflectionPointIdx"
    .parameter "reflectionOpacity"

    .prologue
    .line 160
    add-int/lit8 p1, p1, 0x1

    .line 161
    if-gtz p1, :cond_0

    iget v0, p0, Lcom/nemustech/tiffany/world/TFReflectivePanel;->mStepCount:I

    const/4 v1, 0x2

    sub-int/2addr v0, v1

    if-ge p1, v0, :cond_1

    .line 162
    :cond_0
    iget-object v0, p0, Lcom/nemustech/tiffany/world/TFReflectivePanel;->mReflectionRates:[F

    aput p2, v0, p1

    .line 168
    :goto_0
    return-void

    .line 165
    :cond_1
    const-string v0, "TFReflectivePanel"

    const-string v1, "setInflectionPointRelfectionRate() ERROR. Argument reflectionInflectionPoint must be a positive integer less than the number of steps."

    invoke-static {v0, v1}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I

    goto :goto_0
.end method

.method public setReflectionLength(F)V
    .locals 7
    .parameter "reflectionLength"

    .prologue
    const/4 v6, 0x1

    const/4 v5, 0x0

    .line 85
    cmpg-float v1, v5, p1

    if-gtz v1, :cond_1

    float-to-double v1, p1

    const-wide/high16 v3, 0x3ff0

    cmpg-double v1, v1, v3

    if-gtz v1, :cond_1

    .line 86
    iget-object v1, p0, Lcom/nemustech/tiffany/world/TFReflectivePanel;->mReflectionPoints:[F

    iget v2, p0, Lcom/nemustech/tiffany/world/TFReflectivePanel;->mStepCount:I

    sub-int/2addr v2, v6

    aput p1, v1, v2

    .line 87
    const/4 v0, 0x1

    .local v0, i:I
    :goto_0
    iget v1, p0, Lcom/nemustech/tiffany/world/TFReflectivePanel;->mStepCount:I

    if-ge v0, v1, :cond_2

    .line 88
    iget-object v1, p0, Lcom/nemustech/tiffany/world/TFReflectivePanel;->mReflectionPoints:[F

    aget v1, v1, v0

    cmpg-float v1, p1, v1

    if-gez v1, :cond_0

    .line 89
    iget-object v1, p0, Lcom/nemustech/tiffany/world/TFReflectivePanel;->mReflectionPoints:[F

    aput p1, v1, v0

    .line 87
    :cond_0
    add-int/lit8 v0, v0, 0x1

    goto :goto_0

    .line 94
    .end local v0           #i:I
    :cond_1
    iget-object v1, p0, Lcom/nemustech/tiffany/world/TFReflectivePanel;->mReflectionPoints:[F

    iget v2, p0, Lcom/nemustech/tiffany/world/TFReflectivePanel;->mStepCount:I

    sub-int/2addr v2, v6

    aput v5, v1, v2

    .line 96
    :cond_2
    invoke-virtual {p0}, Lcom/nemustech/tiffany/world/TFReflectivePanel;->buildAllArray()V

    .line 97
    return-void
.end method
